<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img {
            width: 200px;
            height: 200px;
        }
    </style>
</head>

<body>
    <h1>详情页</h1>
    <ul>

    </ul>
    <script>
        var goods = JSON.parse(localStorage.getItem('goods'))
        // 渲染
        document.querySelector('ul').innerHTML = `
            <div class="son">
                <img src="${goods.img}" onclick='tiao(${goods.id})'><br>
                <span>名称:${goods.name}</span><br>
                <span>价格:${goods.price}</span>
            </div>`
    </script>
</body>

</html>